﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using Majoopic.WPFClient.Properties;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace Majoopic.WPFClient.Converters
{
    public class NullImageConverter : IValueConverter
    {
        private ImageSourceConverter imageConverter = new ImageSourceConverter();

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value == null)
            {
                //BitmapImage bi3 = new BitmapImage();
                //bi3.BeginInit();
                //bi3.UriSource = new Uri("/Majoopic.WPFClient;component/Resources/jpeg_file.png", UriKind.Relative);
                //bi3.EndInit();
                //return ;
                return "/Majoopic.WPFClient;component/Resources/jpeg_file.png";
            }


            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
